<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<style>
    body{
        background-color: #efeff4;
    }
    .logout{
        width: 100%;
        text-align: center;
    }
    .logout .logout_btn{
        font-size: 1.3rem;
        padding: 1rem 0;
        background: #1abf8a;
        display: inline-block;
        width: 95%;
    }
    .logout .logout_btn a{
        color: #FFF;
    }
    .vip_center .vip_header{
        background: #efeff4;
        padding:1rem;
    }
    .head{
        padding: 15px 0;
        font-size: 1.2rem;
        color: #929292;
    }
    .content{
        width: 100%;
        text-align: center;
    }
    .content textarea{
        width: 100%;
        border: 0;
        height: 200px;
        font-size: 1.2rem;
    }
</style>
<div class="vip_center">
    <div class="vip_header">
        <span class="head">问题或意见</span>
    </div>
    <div class="content">
        <textarea id="content" placeholder="Hi，遇到任何问题都可以随时向我提哦~~"></textarea>
    </div>
    <div class="logout">
        <div class="logout_btn">
            <a href="javascript:;" id="logout">提交</a>
        </div>
    </div>
</div>
<script>
    $(function () {
        //提交意见
        mui('body').on("tap", ".logout", function () {
            var content = $("#content").val();
            if(isEmpty(content)){
                mui.toast("请写点什么吧~~")
                return false;
            }
            $.ajax({
                url: _basePath + "app/member/opinion",
                data : {
                    content :content
                },
                dataType: 'json',
                success: function (data) {
                    if(typeof data.resCode != undefined && data.resCode == 0) {
                        mui.toast("提交成功");
                        mui.openWindow({
                            url: _basePath + "app/page?pv=mine_suggested"
                        })
                    }else{
                        mui.toast(data['message']);
                    }
                }
            });
        })
    })
</script>